<%@page import="com.wanmait.cookbook.vo.IngredientsConsumption"%>
<%@page import="com.wanmait.cookbook.vo.Step"%>
<%@page import="java.util.List"%>
<%@page import="com.wanmait.cookbook.vo.Cookbook"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<!-- saved from url=(0044)https://www.douguo.com/cookbook/1605903.html -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="icon"
	href="https://cp1.douguo.com/static/nweb/images/favicon.ico?v=1912"
	type="image/x-icon">
<link rel="stylesheet"
	href="<%=path%>/static/cookbookShow_files/main.css">
<link rel="stylesheet"
	href="<%=path%>/static/cookbookShow_files/recipe.css">
<script src="<%=path%>/static/cookbookShow_files/hm.js.下载"></script>
<script src="<%=path%>/static/cookbookShow_files/jquery.js.下载"></script>
<script data-ad-client="ca-pub-6608973961595981" async=""
	src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
	var _hmt = _hmt || [];
	(function() {
		var hm = document.createElement("script");
		hm.src = "https://hm.baidu.com/hm.js?f4fa5d56f272ae0a0777feec2184a97f";
		var s = document.getElementsByTagName("script")[0];
		s.parentNode.insertBefore(hm, s);
	})();
</script>
<style>
.one-pan-tip {
	cursor: pointer;
}

.one-pan-tip::before {
	background-position: center;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	box-sizing: border-box;
	width: 1em;
	height: 1em;
	margin: 0 1px .15em 1px;
	vertical-align: middle;
	display: inline-block;
}

.one-pan-tip-success::before {
	content: '';
	background-image:
		url()
}

.one-pan-tip-error {
	text-decoration: line-through;
}

.one-pan-tip-error::before {
	content: '';
	background-image:
		url()
}

.one-pan-tip-other::before {
	content: '';
	background-image:
		url()
}

.one-pan-tip-lock::before {
	content: '';
	background-image:
		url()
}
</style>
<meta name="ljjc::status" content="on">
</head>
<body>
	<style>
#banner .care-txt {
	color: #fff;
	background-color: #FFB31A;
	border-radius: 5px;
	display: inline-block;
	width: 646px;
	text-align: center;
	height: 32px;
	line-height: 32px;
	position: absolute;
	bottom: 16px;
	left: 22px;
}

#banner .care-icon {
	width: 15px;
	vertical-align: middle;
	position: relative;
	top: -1px;
}
</style>

<%
	Cookbook cookbook =(Cookbook)request.getAttribute("cookbook");
	int cookbookCollectCount =(int)request.getAttribute("cookbookCollectCount");
	List<Step> steps =(List<Step>)request.getAttribute("steps");
	List<IngredientsConsumption> ingredientsConsumptions = (List<IngredientsConsumption>)request.getAttribute("ingredientsConsumptions");
%>

	<!-- 展示开始-->

	<div style="margin:50px;width:500"  id="content" class="recipe-content clearfix">
		<div id="left">
			<!-- 封面图 -->

			<!-- 菜谱名称，昵称，关注 -->
			<div class="relative">
				<div id="banner" class="cboxElement cboxElement1"
					data-origin="https://cp1.douguo.com/upload/caiku/a/1/c/yuan_a19b73e30d7119e6f21ae5e36845435c.jpg"
					data-snum="1" href="javascript:void(0);" rel="recipe_img">
					<a
						href="<%=path%>/static/cookbookShow_files/yuan_a19b73e30d7119e6f21ae5e36845435c.jpg"
						one-link-mark="yes"> <img class="wb100"
						src="<%=path%>/static/image/<%=cookbook.getPic() %>"
						alt="">
					</a>
				</div>
			</div>
			<div class="rinfo relative">
				<h1 class="title text-lips" style="display: inline-block"><%=cookbook.getTitle() %></h1>
				<div class="boutiExclu">
					<span class="bouti"></span>
				</div>
				<div class="vcnum relative">
					<span><%=cookbook.getPageviews() %></span> 浏览 <span class="collectnum"><%=cookbookCollectCount %></span> 收藏
				</div>
				<div class="clearfix aut-info relative">
					<div class="clearfix left">
						<a class="author-img left"
							href="javascript:void(0)"
							target="_blank" title="一笑＆而过" one-link-mark="yes"> <img
							class="br50"
							src="<%=path%>/static/image/<%=cookbook.getUserinfo().getAvatar() %>"
							alt="一笑＆而过" width="30" height="30">
						</a>
						<div class="author-info left">
							<a class="nickname text-lips"
								href="javascript:void(0)"
								target="_blank" one-link-mark="yes"><%=cookbook.getUserinfo().getName() %></a> <a class="proicon"
								style="position: relative; top: 1px;"
								href="javascript:void(0)" target="_blank"
								one-link-mark="yes"> <img class="proimg"
								src="<%=path%>/static/cookbookShow_files/da84247847aebe48d9dd0fcdac88862a.png"
								alt="一笑＆而过">
							</a>
						</div>

					</div>
				</div>
				<p class="intro">
					<%=cookbook.getInfo() %>
				</p>
				<!-- 个人中心可编辑 -->
			</div>
			<!-- 材料 -->
			<div class="metarial">
				<h2 class="mini-title"><%=cookbook.getTitle() %>的用料</h2>
				<table width="690" border="0" cellspacing="0" cellpadding="0"
					class="retamr br8">
					<tbody>
					<%
					for(int i=0;i<ingredientsConsumptions.size();i++){

					%>
						<tr>
							<td class="lirre" style="border-top: 0;"><span
								class="scname"><a
									href="javascript:void(0)"
									target="_blank" one-link-mark="yes"><%=ingredientsConsumptions.get(i).getIngredientsName()%></a></span> <span
								class="right scnum"><%=ingredientsConsumptions.get(i).getDosage() %></span></td>
								<%if(i+1<ingredientsConsumptions.size()) {%>
							<td style="border-top: 0;"><span class="scname"><a
									href="javascript:void(0)"
									target="_blank" one-link-mark="yes"><%=ingredientsConsumptions.get(i+1).getIngredientsName()%></a></span> <span
								class="right scnum"><%=ingredientsConsumptions.get(i+1).getDosage() %></span></td>
								<%} %>
						</tr>
					<%
						
						i++;
					}
					%>
						
					</tbody>
				</table>
			</div>
			<!-- 步骤 -->
			<div class="step">
				<h2 class="mini-title"><%=cookbook.getTitle() %>的做法</h2>
				<%
				for(int i=0;i<steps.size();i++){
				%>
				<div class="stepcont clearfix">
					<a class="cboxElement cboxElement2" data-snum="2" rel="recipe_img"
						href="javascript:void(0)"
						data-origin="https://cp1.douguo.com/upload/caiku/d/b/d/yuan_db454f83ec6f66ea004d133875c6448d.jpg"
						one-link-mark="yes"> <img class="br8"
						src="<%=path%>/static/image/<%=steps.get(i).getPic() %>"
						alt="肉末豆腐#每一道菜都是一台时光机#的做法图解1" width="200" height="200">
					</a>
					<div class="stepinfo">
						<p>步骤<%=i+1 %></p>
						<%=steps.get(i).getInfo() %>
					</div>
				</div>
				<%} %>
			</div>
			<!-- 小贴士 -->
			<div class="tips">
				<h2 class="mini-title"><%=cookbook.getTitle() %>的烹饪技巧</h2>
				<p><%=cookbook.getTips() %></p>
			</div>
			<p class="creattime">创建时间:<%=cookbook.getInputTime() %></p>
			<div style="padding-top: 10px;">
				<script type="text/javascript"
					src="<%=path%>/static/cookbookShow_files/lgycdohvy.js.下载"></script>
			</div>

		</div>
	</div>
	<!-- 展示结束-->


	<script src="<%=path%>/static/cookbookShow_files/recipe.js.下载"></script>
	<script src="<%=path%>/static/cookbookShow_files/tip.js.下载"></script>
	<script src="<%=path%>/static/cookbookShow_files/search.js.下载"></script>
	<script src="<%=path%>/static/cookbookShow_files/main.js.下载"></script>
	<!-- <script src='https://s13.cnzz.com/c.php?id=30029854' language='JavaScript' charset='gb2312'></script> -->

	<script src="<%=path%>/static/cookbookShow_files/comment.js.下载"></script>
	<script src="<%=path%>/static/cookbookShow_files/page.js.下载"></script>
	<script>
		var comments = '';
		$(function() {
			$.ajax({
				url : "/login/user",
				data : "",
				success : function(res) {
					var user = res.data.user;
					comments = new Comments("1605903", 'cook', user,
							'71qu9NFO7Ucz9Q3856CNcphLCYAEnrLUOys4qvIk');
					comments.getCommentList(0, 10);
				}
			})
		})
	</script>

</body>
</html>